# Python 字符串对齐方法详解
## ljust()方法
s = "http://c.biancheng.net/python/"
addr = "http://c.biancheng.net"
print("s.ljust(35) =", s.ljust(35))
print("addr.ljust(35) =", addr.ljust(35))
print("s.ljust(35, '-') =", s.ljust(35, "-"))
print("addr.ljust(35, '-') =", addr.ljust(35, "-"))
print()

## rjust()方法
print("s.rjust(35) =", s.rjust(35))
print("addr.rjust(35) =", addr.rjust(35))
print("s.rjust(35, '-') =", s.rjust(35, "-"))
print("addr.rjust(35, '-') =", addr.rjust(35, "-"))
print()

## center()方法
print("s.center(35) =", s.center(35))
print("addr.center(35) =", addr.center(35))
print("s.center(35, '-') =", s.center(35, "-"))
print("addr.center(35, '-') =", addr.center(35, "-"))
